<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>image-hover-menu</title>
    <style>
        .hover-menu {
            position: relative;
            overflow: hidden;
            margin: 8px;
            min-width: 340px;
            max-width: 480px;
            max-height: 290px;
            width: 100%;
            background-color: #000;
            text-align: center;
            box-sizing: border-box;
        }
        .hover-menu * {
            box-sizing: border-box;
        }
        .hover-menu .hover-menu-img {
            position: relative;
            max-width: 100%;
            top: 0;
            right: 0;
            opacity: 1;
            transition: .3s ease-in-out;
            object-fit: cover;
        }
        .hover-menu .hover-menu-container {
            position: absolute;
            top: 0;
            left: -120px;
            width: 120px;
            height: 100%;
            padding: 8px 4px;
            background-color: #000;
            transition: .3s ease-in-out;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }
        .hover-menu .hover-menu-container .hover-menu-link {
            display: block;
            line-height: 2;
            color: #fff;
            text-decoration: none;
            opacity: .8;
            padding: 5px 15px;
            position: relative;
            transition: .3s ease-in-out;
        }
        .hover-menu .hover-menu-container .hover-menu-link:hover {
            text-decoration: underline;
        }
        .hover-menu:hover .hover-menu-img {
            opacity: .5;
            right: -120px;
        }
        .hover-menu:hover .hover-menu-container {
            left: 0;
            opacity: 1;
        }
    </style>
</head>
<body>
    <figure class="hover-menu">
        <img src="https://www.eveningwater.com/img/segmentfault/1.png" alt="图片加载中" class="hover-menu-img">
        <div class="hover-menu-container">
            <a href="#" class="hover-menu-link">Home</a>
            <a href="#" class="hover-menu-link">Pricing</a>
            <a href="#" class="hover-menu-link">About</a>
        </div>
    </figure>
</body>
</html>